<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>业主福利</title>
		<meta name="viewport" content="width=device-width,initial-scale=2.0,maximum-scale=1.0,user-scalable=0;" />
		<meta name="apple-mobile-web-app-status-bar-style" content="black" />
		<meta name="format-detection" content="telphone=no, email=no" />
		<link rel="stylesheet" href="/static/css/common.css">
		<link rel="stylesheet" href="/static/css/iscroll.css">
		<!--
		<link rel="stylesheet/less" type="text/css" href="/static/less/wechat/coupon/lists_new.less">
		<script src="/static/js/less.js" type="text/javascript"></script>
		-->
		<link rel="stylesheet"  href="__PUBLIC__/css/base.css">
		<link rel="stylesheet"  href="__PUBLIC__/css/lwh.css">

	</head>
	<body status = "0" s = "0" x="0" limit="10" >
		<div id="main" style="background: #ffffff">
			<div id="top_ad" style="position: relative">
				<ul>
					<li>
						<a href="javascript:void(0)"><img src="/advertise/bar/wechat/1.png"/></a>
					</li>
					<li>
						<a href="javascript:void(0)"><img src="/advertise/bar/wechat/2.png"/></a>
					</li>
				</ul>
				<br style="clear: both" />
			</div>

			<div id="coupon_list"  style="background: #f0f2f5;">
				<ul class="couponContent">
					<li class="yhq">
						<div class=" companyInfo blue-bg">
							<div class="companyLogo"><img src="/advertise/bar/wechat/1.png"/>
							</div>
							<div class="info">
								<div class="yhprice">
									<div class=" cashyhq">
										<label class="msymbol">￥</label><label class="price">50</label>
									</div>
									<div class="yhHide feelyhq">
										<label class="yhfeel"> 免费</label>
									</div>
									<div class="yhHide discountyhq">
										<label class="price">7</label><label class="zhe">折</label>
									</div>
								</div>
								<div class="yhinfo">
									<label class="yhType">全部商品</label><label class="companyName">可利丁丝</label><div style="clear: both"></div>
								</div>
							</div><div style="clear: both"></div>
						</div>
						<div class="coupop-item">
							<div class="yhContent">
								<span class="yhTime">2016.06.23-2016-08-10</span><span class="yhmk">直减无消费门槛</span>
							</div><label class="yhylq">已领取</label>
							<div  class="yhAction ">
								已抢光
							</div><div style="clear: both"></div>
						</div>
					</li>
				</ul>

			</div>
			<div class="lodding"></div>
			<div class="footer-tips clearfix hidden">
				<img width="60" height="70" class="footer-tips-img" src="/advertise/bar/wechat/dingding.png"/>
				<p class="footer-tips-txt">
					福利不断更新，常回来看看哦~
				</p>
			</div>
		</div>
		<div class="lodding"></div>
		<div id="backTop" class="backTop">
			<img width="50" height="50" src="/advertise/bar/wechat/backTop.png"/>
		</div>
	</body>
	<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript"></script>
	<script type="text/javascript" src="/static/js/jquery-1.9.1.js"></script>
	<script type="text/javascript" src="/static/js/iscroll/iscroll-probe.js"></script>
	<script type="text/javascript" src="/static/js/iscroll/pullToRefresh.js"></script>
	<script src="/static/js/wechat/coupon/yhq_wechat.js"></script>
	<script>
		$(function() {
			queryId = "coupon_list";
			getCouponList(0, 10, $("#coupon_list"), true);
			var win = $(window).width();
			$(".info").width((win - 90) + "px");
			$(window).resize(function() {
				var win = $(window).width();
				$(".info").width((win - 90) + "px");
			})
			// 			$(".couponContent").width((win-60)+"px");

			$(".coupon_me .i-me").unbind("click").click(function() {
				window.location = "/wechat/Coupon/mycoupon"
			});

			//领取优惠券
			$("body").off("click").on("click", ".yhq", function() {

				var $this = $(this), num = parseInt($this.attr("number")), ucid = $this.attr("ucid"), Lq = $this.attr("lqType"), couponId = $this.attr("couponID"), is_get = parseInt($this.attr("is_get")), used = parseInt($this.attr("used")), limit = parseInt($this.attr("limit")), color = $.trim($this.attr("color"));
				used = isNaN(used) ? 0 : used;
				if (is_get > used) {
					//已领取还没用
					window.location = "/wechat/coupon/ewm?couponID=" + couponId + "&ucid=" + ucid + "&color=" + color;
				} else if (num == 0) {
					//抢光
					window.location = "/wechat/coupon/endcoupop?a=getcoupop&couponID=" + couponId + "&ucid=" + ucid + "&color=" + color;
				} else if (is_get >= limit && used == is_get) {//领完且使用完
					window.location = "/wechat/coupon/uses?a=uses&couponID=" + couponId + "&ucid=" + ucid + "&color=" + color;
				} else if (is_get < limit && is_get == used && num > 0) {//用完了还可以领取且没抢光
					window.location = "/wechat/coupon/getcoupop?a=getcoupop&couponID=" + couponId + "&ucid=" + ucid + "&color=" + color;
				}

			})
			wxShare('田丁业主福利', '关注田丁公众号，获取更多业主福利', 'http://html.dev.zanjia365.com/224.jpg');
		})
	</script>
</html>